﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Template.Master" AutoEventWireup="true" CodeBehind="Cart.aspx.cs" Inherits="PHTShop.WebForm9" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 <div class="title"><span class="title_icon"><img src="images/bullet1.gif" alt="" title="" /></span><label id="lblMyCart" runat="server" meta:resourcekey="lblMyCart" >My cart</label></div>
        
        	<div class="feat_prod_box_details">
            

    <asp:Panel ID="PanelCart" runat="server">

            <table class="cart_table">
            	<tr class="cart_title">
                    <td><label id="lbltdDelete" runat="server" meta:resourcekey="lbltdDelete">Delete</label></td>
                	<td><label id="lbltdPhoto" runat="server" meta:resourcekey="lbltdPhoto"></label></td>
                	<td><label id="lbltdName" runat="server" meta:resourcekey="lbltdName"></label></td>
                    <td><label id="lbltdPrice" runat="server" meta:resourcekey="lbltdPrice"></label></td>
                    <td><label id="lbltdQty" runat="server" meta:resourcekey="lbltdQty"></label></td>
                    <td><label id="lbltdTotal" runat="server" meta:resourcekey="lbltdTotal"></label></td>               
                </tr>
                <asp:Repeater ID="RepeaterCart" runat="server">
                    <ItemTemplate>

                        	<tr>

                    <td>
                    <asp:LinkButton ID="LinkButtondelete" runat="server" OnClick="LinkButtondelete_click">X</asp:LinkButton>                
                    <asp:HiddenField ID="HiddenField" runat="server" Value='<%# Eval("pro.id") %>'/>
                    </td>
                	<td><a href='<%# "Details.aspx?productsId=" + Eval("pro.id") %>'><img src='<%# Eval("photoName") %>' alt="" title="" border="0" class="cart_thumb" width="23" height="35" /></a></td>
                	<td><%# Eval("prolg.name")%></td>
                    <td><%# Eval("pro.price")%></td>
                    <td>
                        
                        <asp:TextBox ID="TextBoxquantity" runat="server" Text='<%# Eval("qua") %>' Width="20"></asp:TextBox>
                        <asp:RangeValidator ID="RangeValidatorQuantity" runat="server" ErrorMessage="*" ControlToValidate="TextBoxquantity" Type="Integer" MinimumValue="1" MaximumValue="1000" Display="Dynamic"></asp:RangeValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorQuantity" runat="server" ErrorMessage="*" Display="Dynamic" ControlToValidate="TextBoxquantity"></asp:RequiredFieldValidator>
                                               
                    
                     <a runat="server" id="Buttonupdate_click" onserverclick="Buttonupdate_click">
                        <img src="images/updateIcon.ico" alt="" title="" border="0" width="18" height="19"/>
                     </a>

                    </td>
                    <td><%# Convert.ToDecimal(Eval("pro.price")) * Convert.ToDecimal(Eval("qua")) %></td>               
                </tr>  

                    </ItemTemplate>
                </asp:Repeater>
                
                <tr>
                <td colspan="5" class="cart_total"><span class="red" id="lblTotal" runat="server" meta:resourcekey="lblTotal"> TOTAL:</span></td>
                <td>
                    <asp:Label ID="Labeltotal" runat="server" Text=""></asp:Label>$
                    </td>                
                </tr>                  
            
            </table>

            
    <br />
            <asp:Label ID="LabelTitlePayment" runat="server" meta:resourcekey="LabelTitlePayment"
                    Font-Size="XX-Large">Payments</asp:Label>
    
    <br />

            <asp:RadioButtonList ID="RadioButtonListPayment" runat="server" 
                    onselectedindexchanged="RadioButtonListPayment_SelectedIndexChanged" 
                    AutoPostBack="True">
                
            </asp:RadioButtonList>      

    </asp:Panel>

    <asp:Panel ID="PanelPay" runat="server" Visible="false">

            <table class="cart_table">
            	<tr class="cart_title">
                	<td><label id="Label2" runat="server" meta:resourcekey="lbltdPhoto"></label></td>
                	<td><label id="Label3" runat="server" meta:resourcekey="lbltdName"></label></td>
                    <td><label id="Label4" runat="server" meta:resourcekey="lbltdPrice"></label></td>
                    <td><label id="Label5" runat="server" meta:resourcekey="lbltdQty"></label></td>
                    <td><label id="Label6" runat="server" meta:resourcekey="lbltdTotal"></label></td>               
                </tr>
                <asp:Repeater ID="RepeaterCart2" runat="server">
                    <ItemTemplate>

                        	<tr>

                	<td><a href='<%# "Details.aspx?productsId=" + Eval("pro.id") %>'><img src='<%# Eval("photoName") %>' alt="" title="" border="0" class="cart_thumb" width="23" height="35" /></a></td>
                	<td><%# Eval("prolg.name")%></td>
                    <td><%# Eval("pro.price")%></td>
                    <td> <%# Eval("qua") %></td>
                    <td><%# Convert.ToDecimal(Eval("pro.price")) * Convert.ToDecimal(Eval("qua")) %></td>               
                </tr>  

                    </ItemTemplate>
                </asp:Repeater>
                
                <tr>
                <td colspan="4" class="cart_total"><span class="red" id="Span1" runat="server" meta:resourcekey="lblTotal"> TOTAL:</span></td>
                <td>
                    <asp:Label ID="Labeltotal2" runat="server" Text=""></asp:Label>$
                    </td>                
                </tr>                  
            
            </table>

    </asp:Panel>
    
    <br />
    

    <p style="font-size:large" runat="server" id="yourPayment" visible="false">Your payment : <asp:Label ID="LabelYourPayment" runat="server" Text=""></asp:Label></p>
            
    <br />
    <asp:LinkButton ID="LinkButtonContinue" runat="server" class="continue" PostBackUrl="Default.aspx">continue</asp:LinkButton>
    <asp:LinkButton ID="LinkButtonCancel" runat="server" class="continue" Visible="false" 
                    onclick="LinkButtonCancel_Click">Cancel</asp:LinkButton>

            <asp:LinkButton ID="LinkButtoncheckOut" runat="server" PostBackUrl="" 
                    class="checkout" onclick="LinkButtoncheckOut_Click" meta:resourcekey="LinkButtoncheckOut">Check out</asp:LinkButton>
             <asp:LinkButton ID="LinkButtonGoPay" runat="server" class="checkout" Visible="false" >Go pay</asp:LinkButton>
             
            
             
            
            </div>	
            
    <input type="hidden" name="cmd" value="_cart" />
    <input type="hidden" name="business" value="<%= this.Bussiness %>"/>
    <input type="hidden" name="return" value="<%= this.Success %>" />
    <input type="hidden" name="cancel" value="<%= this.Cancel %>" />
    <input type="hidden" name="upload" value="1" />


    <% try
       {
           for (int i = 0; i < this.Cart.Count; i++)
           {%>
    <input type="hidden" name="item_number_<%= i + 1 %>" value="<%= this.Cart[i].prolg.productsId %>" />
    <input type="hidden" name="item_name_<%= i + 1 %>" value="<%= this.Cart[i].prolg.name %>" />
    <input type="hidden" name="amount_<%= i + 1 %>" value="<%= Convert.ToDouble(this.Cart[i].pro.price)%>" />
    <input type="hidden" name="quantity_<%= i + 1 %>" value="<%= this.Cart[i].qua %>" />

    <%      }
       }
       catch { }%>

            

</asp:Content>
